// 全局样式

// 重置样式
* {
  box-sizing: border-box;
}

body {
  color: #333;
  font-size: 14px;
  background-color: #f5f7fa;
  height: 100%;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
}

// 清除浮动
.clearfix {
  &::after {
    content: "";
    display: table;
    clear: both;
  }
}

// 滚动条样式
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: #c0c4cc;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #909399;
}

// 文本溢出省略
.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-ellipsis-2 {
  display: -webkit-box;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

// 文字对齐
.text-left {
  text-align: left;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

// 元素定位
.position-relative {
  position: relative;
}

.position-absolute {
  position: absolute;
}

.position-fixed {
  position: fixed;
}

// 元素显示
.d-none {
  display: none;
}

.d-block {
  display: block;
}

.d-inline-block {
  display: inline-block;
}

.d-flex {
  display: flex;
}

// flex布局
.flex-row {
  flex-direction: row;
}

.flex-column {
  flex-direction: column;
}

.justify-content-start {
  justify-content: flex-start;
}

.justify-content-center {
  justify-content: center;
}

.justify-content-end {
  justify-content: flex-end;
}

.justify-content-between {
  justify-content: space-between;
}

.justify-content-around {
  justify-content: space-around;
}

.align-items-start {
  align-items: flex-start;
}

.align-items-center {
  align-items: center;
}

.align-items-end {
  align-items: flex-end;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-nowrap {
  flex-wrap: nowrap;
}

.flex-1 {
  flex: 1;
}

// 间距
@for $i from 0 through 10 {
  .mt-#{$i} {
    margin-top: #{$i * 5}px !important;
  }
  
  .mr-#{$i} {
    margin-right: #{$i * 5}px !important;
  }
  
  .mb-#{$i} {
    margin-bottom: #{$i * 5}px !important;
  }
  
  .ml-#{$i} {
    margin-left: #{$i * 5}px !important;
  }
  
  .pt-#{$i} {
    padding-top: #{$i * 5}px !important;
  }
  
  .pr-#{$i} {
    padding-right: #{$i * 5}px !important;
  }
  
  .pb-#{$i} {
    padding-bottom: #{$i * 5}px !important;
  }
  
  .pl-#{$i} {
    padding-left: #{$i * 5}px !important;
  }
}

// 基本阴影
.box-shadow {
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

// 页面内容区域
.content-container {
  padding: 16px;
  background-color: #fff;
  border-radius: 4px;
}

// 过渡动画
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

// Breadcrumb 面包屑动画
.breadcrumb-enter-active,
.breadcrumb-leave-active {
  transition: all 0.5s;
}

.breadcrumb-enter-from,
.breadcrumb-leave-active {
  opacity: 0;
  transform: translateX(20px);
}

.breadcrumb-move {
  transition: all 0.5s;
}

.breadcrumb-leave-active {
  position: absolute;
}

// 重置样式
* {
  box-sizing: border-box;
}

body {
  color: #333;
  font-size: 14px;
  background-color: #f5f7fa;
  height: 100%;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
}

// 清除浮动
.clearfix {
  &::after {
    content: "";
    display: table;
    clear: both;
  }
}

// 滚动条样式
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: #c0c4cc;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #909399;
}

// 文本溢出省略
.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-ellipsis-2 {
  display: -webkit-box;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

// 文字对齐
.text-left {
  text-align: left;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

// 元素定位
.position-relative {
  position: relative;
}

.position-absolute {
  position: absolute;
}

.position-fixed {
  position: fixed;
}

// 元素显示
.d-none {
  display: none;
}

.d-block {
  display: block;
}

.d-inline-block {
  display: inline-block;
}

.d-flex {
  display: flex;
}

// flex布局
.flex-row {
  flex-direction: row;
}

.flex-column {
  flex-direction: column;
}

.justify-content-start {
  justify-content: flex-start;
}

.justify-content-center {
  justify-content: center;
}

.justify-content-end {
  justify-content: flex-end;
}

.justify-content-between {
  justify-content: space-between;
}

.justify-content-around {
  justify-content: space-around;
}

.align-items-start {
  align-items: flex-start;
}

.align-items-center {
  align-items: center;
}

.align-items-end {
  align-items: flex-end;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-nowrap {
  flex-wrap: nowrap;
}

.flex-1 {
  flex: 1;
}

// 间距
@for $i from 0 through 10 {
  .mt-#{$i} {
    margin-top: #{$i * 5}px !important;
  }
  
  .mr-#{$i} {
    margin-right: #{$i * 5}px !important;
  }
  
  .mb-#{$i} {
    margin-bottom: #{$i * 5}px !important;
  }
  
  .ml-#{$i} {
    margin-left: #{$i * 5}px !important;
  }
  
  .pt-#{$i} {
    padding-top: #{$i * 5}px !important;
  }
  
  .pr-#{$i} {
    padding-right: #{$i * 5}px !important;
  }
  
  .pb-#{$i} {
    padding-bottom: #{$i * 5}px !important;
  }
  
  .pl-#{$i} {
    padding-left: #{$i * 5}px !important;
  }
}

// 基本阴影
.box-shadow {
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

// 页面内容区域
.content-container {
  padding: 16px;
  background-color: #fff;
  border-radius: 4px;
}

// 过渡动画
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

// Breadcrumb 面包屑动画
.breadcrumb-enter-active,
.breadcrumb-leave-active {
  transition: all 0.5s;
}

.breadcrumb-enter-from,
.breadcrumb-leave-active {
  opacity: 0;
  transform: translateX(20px);
}

.breadcrumb-move {
  transition: all 0.5s;
}

.breadcrumb-leave-active {
  position: absolute;
}